package org.tongdao.yulong.a_quickstart_byname;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.tongdao.yulong.a_quickstart_byname.bean.Person;
import org.tongdao.yulong.dao.DemoDao;
import org.tongdao.yulong.dao.impl.DemoDaoImpl;

/**
 * @Description: TODO
 * @author: 殷玉龙
 * @date: 2020年09月27日 4:42 下午
 */
public class QuickStartByTypeApplication {
  public static void main(String[] args) throws Exception {
    BeanFactory factory = new ClassPathXmlApplicationContext("basic_dl/quickstart-bytype.xml");
    Person person = (Person) factory.getBean(Person.class);
    System.out.println(person);

    DemoDao demoDao = factory.getBean(DemoDaoImpl.class);
    System.out.println(demoDao.findAll());
  }
}
